import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

export const routes = [
  {
    path: "/",
    redirect: {
      name: "login"
    }
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login.vue")
  },
  // {
  //   path: '',
  //   component: (resolve) => require(['@/views/list'], resolve)
  // },
  {
    path: '/list',
    component: (resolve) => require(['@/views/list'], resolve)
  },
  {
    path: '/add',
    component: (resolve) => require(['@/views/list/add'], resolve)
  },
  {
    path: '/edit',
    component: (resolve) => require(['@/views/list/edit'], resolve)
  },
  {
    path: '/wendangguanli',
    component: (resolve) => require(['@/views/list/wendangguanli'], resolve)
  },
  {
    path: '/renyuanguanli',
    component: (resolve) => require(['@/views/list/renyuanguanli'], resolve)
  },
  {
    path: '/moxingguanli',
    component: (resolve) => require(['@/views/list/moxingguanli'], resolve)
  },
  {
    path: '/chakan',
    component: (resolve) => require(['@/views/list/chakan'], resolve)
  },

  {
    path: '/view',
    component: (resolve) => require(['@/views/list/view'], resolve)
  },
  {
    path: '/graph',
    component: (resolve) => require(['@/views/graph/edit'], resolve)
  }
];

export default new VueRouter({
  mode: 'hash',
  routes: routes
});
